home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE02 / TIPTRIX / DBGRIDFX.PAS next >
Encoding:
Pascal/Delphi Source File  |  1995-06-01  |  925 b   |  50 lines

  1. unit Dbgridfx;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils,
  7.   WinTypes,
  8.   WinProcs,
  9.   Messages,
  10.   Classes,
  11.   Graphics,
  12.   Controls,
  13.   Forms,
  14.   Dialogs,
  15.   Grids,
  16.   DBGrids;
  17.  
  18. type
  19.   TDBGridFix = class(TDBGrid)
  20.   private
  21.     { Private declarations }
  22.     procedure SetFixedFixedColor(Value: TColor);
  23.     function  GetFixedFixedColor: TColor;
  24.   published
  25.     { Published declarations }
  26.     property FixedColor: TColor read GetFixedFixedColor write SetFixedFixedColor default clBtnFace;
  27.   end;
  28.  
  29. procedure Register;
  30.  
  31. implementation
  32.  
  33. procedure TDBGridFix.SetFixedFixedColor(Value: TColor);
  34. begin
  35.   inherited TitleColor := Value;
  36.   inherited FixedColor := Value; { Not really needed, just to be on the safe side }
  37. end;
  38.  
  39. function TDBGridFix.GetFixedFixedColor: TColor;
  40. begin
  41.   Result := inherited TitleColor;
  42. end;
  43.  
  44. procedure Register;
  45. begin
  46.   RegisterComponents('Data Access', [TDBGridFix]);
  47. end;
  48.  
  49. end.
  50.